public class Kxz {
    public static void main(String[] args){
        int i=0,i1=0,i2=0;
        int sum=0,sum1=0,sum2=0;
        for(i=0;i<=20;i+=2)
        {
            sum+=i;
            System.out.println(i);
        }
        while(i1<=20)
        {
            System.out.println(i1);
            sum1+=i1;
            i1+=2;
        }
        do{
            System.out.println(i2);
            sum2+=i2;
            i2+=2;
        }while(i2<=20);
        System.out.println(sum);
        System.out.println(sum1);
        System.out.println(sum2);

    }



}
